package chapter04.example05;
class Animal{
    String name = "牧羊犬";
    void shout(){
        dog.shout();
        dog.printName();
    }
}
public class Example05 {
    class  Dog extends Animal{
        public void shout(){
            super.shout();
            System.out.println("汪汪汪......");
        }
        public void printName(){
            System.out.println("名字："+super.name);
        }
    }
    public class Example05 {
        public static void main(String[] args) {
            Dog dog = new Dog();
            dog.shout();
            dog.printName();
        }
    }
}

